import request from '@/utils/request'

// 获取视频列表接口
interface ISearch{
  searchText:string,
  pageStart:number
}
export const getVideoListApi=(data:ISearch)=>request({
  url:"/VueHandler/VideoHandler?action=showlist",
  method:"post",
  data
})

// 删除视频接口
export const deleteVideoApi=(ID:number)=>request({
  url:"/VueHandler/VideoHandler?action=delete",
  method:"get",
  params:{ID}
})

// 上传视频接口

export const uploadVideoApi=(data:any)=>request({
  url:"/VueHandler/UpLoadVideoHandler",
  method:"post",
  // 
  headers:{ //上传类型的请求头
    'Content-Type': 'multipart/form-data'
  },
  data
})

// 视频 添加接口
export const addVideoApi=(data:any)=>request({
  url:"/VueHandler/VideoHandler?action=add",
  method:"post",
  data
})

// 视频编辑接口
export const editVideoApi=(data:any)=>request({
  url:"/VueHandler/VideoHandler?action=update",
  method:"post",
  data
})